<form [formGroup]="form">
  <ix-fieldset [title]="'Access Control Entry' | translate">
    <ix-select
      formControlName="tag"
      [label]="'Who' | translate"
      [options]="tags$"
      [required]="true"
    ></ix-select>

    @if (isUserTag) {
      <ix-combobox
        formControlName="user"
        [label]="'User' | translate"
        [tooltip]="tooltips.user | translate"
        [provider]="userProvider"
        [allowCustomValue]="true"
        [required]="true"
      ></ix-combobox>
    }

    @if (isGroupTag) {
      <ix-combobox
        formControlName="group"
        [label]="'Group' | translate"
        [tooltip]="tooltips.group | translate"
        [provider]="groupProvider"
        [allowCustomValue]="true"
        [required]="true"
      ></ix-combobox>
    }

    <ix-checkbox-list
      formControlName="permissions"
      inlineFieldFlex="33%"
      [label]="'Permissions' | translate"
      [options]="permissions$"
      [inlineFields]="true"
    ></ix-checkbox-list>

    <div class="label">{{ 'Flags' }}</div>
    <ix-checkbox
      class="default-checkbox"
      formControlName="default"
      [label]="'Default' | translate"
    ></ix-checkbox>
  </ix-fieldset>
</form>
